home *** CD-ROM | disk | FTP | other *** search
- Ch 14 − Customising Powerbase
-
- This chapter describes all the things you can do to influence the way
- Powerbase looks and functions.
-
- 14.1 Overall control of the database
-
- A Powerbase database is normally controlled in four ways:−
-
- • mouse-clicks on the keypad
-
- • keystrokes which mimic the actions of the keypad
-
- • choices from the main menu
-
- • choices from the icon-bar menu
-
- Each of these can be disabled by deselecting one of the option switches on
- the Password window (see 11.2). The main reason why you might want to do
- this is to provide limited facilities to someone else who is using your
- database. It doesn’t, on the face of it, make a lot of sense to disable
- both the keypad and the keystroke-equivalents as no browsing or editing
- would then be possible. You can, however, place some or all of the keypad
- buttons on the record screen itself (see 4.2.9) thus allowing you to choose
- what functions you want to allow access to. You might, for example, wish to
- provide only the “Next record”, “Previous record” and “Search” buttons.
- Define these as Button fields at the time the record is being designed then
- disable the keypad and keystroke equivalents.
-
- Other switches in the Password window enable you to stop the user exporting
- data as CSV files or subsets or printing reports.
-
- 14.2 Defining the function keys
-
- Any button on the keypad may have its action duplicated by one of the keys
- F1-F11, with or without the use of Shift, Ctrl or both.
-
- Point at the button to which you wish to assign a key and click MENU to
- display the keypad menu. Assign leads to a window which shows the present
- key-assignment, if any. Use the “bump” icons to select the required function
- key and, if desired, select one or both of the switches for Shift and Ctrl.
- Click on the Assign button and you will now find that the assigned key
- exactly mimics the keypad button − even to the extent of actually “pressing”
- the button when you type the key.
-
- One important constraint should be noted. Whatever key you assign to the
- Search button, Powerbase will automatically assign the shifted version of
- this key to the “search all subfiles” function (see 2.3.1). For this reason
- you should assign an unshifted key to Search and avoid assigning the shifted
- version to any other keypad button.
-
- You may save your key definitions by choosing Save choices from the keypad
- menu and you will find them operative next time you use Powerbase. Please
- note that your definitions work with all the databases you use; there is no
- facility for saving separate assignments for each database. The default
- keystrokes (together with some which duplicate non-keypad actions) are
- listed in Appendix B. If they have been redefined you may restore the
- defaults by choosing Defaults from the keypad menu. If you wish to “lose”
- the redefined keystrokes permanently you should restore the defaults as
- described then Save choices.
-
- List keys on the keypad menu displays all the key definitions (including
- those for non-keypad functions) in a window from which the information may
- be saved as a text file.
-
- 14.3 Print options
-
- The Print options window, accessible from the Print submenu or by typing
- Shift Print, was described in some detail in 3.5 but a few features still
- require comment. You may set up this window to suit the requirements for a
- particular database and then save the set-up as part of the database by
- clicking on Save choices with the in database radio button selected.
-
- A Save box appears which, by default, saves the options file in the PrintRes
- directory under the name PrtOptions. A file of that name, in that directory,
- is read when the database is subsequently re-opened and will set up the
- print options as you left them. You can, of course, give the file a
- different name and even save it in a different place if you wish. Print
- option files are recognisable by their icon, which bears a large “P”. Some
- users like to have several of them in their database’s PrintRes directory to
- do different jobs. It is always possible to load the one you want by opening
- the PrintRes directory (Show resources from Print submenu or, alternatively,
- Ctrl R) and double-clicking on the required file or dragging it onto the
- record window.
-
- Should you wish to “throw out” your special keys set-up during a working
- session with the database you can restore the default settings by clicking
- Load default. If you like your own setup better than the default and wish to
- use it for all your databases then select the as default radio button before
- clicking Save choices. The file PrtOptions will then be saved inside
- Powerbase itself. Note also that, provided the Print options window has not
- been closed, the Cancel button will restore it to the state it was in when
- you opened it.
-
- 14.4 CSV options
-
- It was explained in 8.2 how to access the CSV options window and what the
- pop-up menus and option switches are for. The buttons Save choices, as
- default, in database, Load default and Cancel work in a similar way to that
- described above for the Print options window − with one notable difference.
- No Save box appears when you Save choices in database; the file is saved as
- a plain text file called CSVoptions. This more limited behaviour has been
- chosen because, although you might want several Print options files for
- different jobs, it is unlikely that you will have a use for several CSV
- options files.
-
- 14.5 Preferences
-
- Several previous references have been made to the Preferences window which
- is opened from the icon-bar menu. A full description of the choices offered
- in this window follows.
-
- 14.5.1 Separators in date and time fields
-
- By default dates have the format dd-mm-yy or dd-mm-yyyy, i.e. the separator
- is a hyphen. You might wish to use a colon, full-stop, slash or other
- character. You may type any non-numeric character when entering dates and
- Powerbase will re-format the field to use the specified character. Only
- fields actually defined to be of type Date behave in this way.
-
- Fields defined to be of type Time have the form hh:mm:ss, i.e a colon is
- used as the separator. As in the case of dates, you may type any non-numeral
- you like during data entry and Powerbase will reformat the time as above.
-
- To change either of these separators type the required character into the
- writable icon in place of the default.
-
- 14.5.2 Wild-cards
-
- The use of wild-card characters is described in 2.7.5 and 3.3.4. By default
- “#” represents a single character and “$” a group of characters which need
- not be matched. You may change either or both wild-card characters if you
- wish in the same way as described above for date and time separators.
-
- 14.5.3 Option switches
-
- Launch new copy, when ON, causes another copy of Powerbase to be loaded when
- you double-click on a database, instead of closing the current database.
- This can be useful if you want to access several databases at once, as one
- copy Powerbase only supports the use of a single database. If there is a
- dormant copy of Powerbase on the icon-bar (i.e. one with “No data” under its
- icon) then double-clicking a database sends it to that copy rather than
- launching a new one. With the switch OFF double-clicking on a database
- closes down an already-open database before opening the new one. Even then
- you can load multiple copies of Powerbase by double-clicking on Powerbase
- itself and then open a different database in each by dragging the databases
- to the icons.
-
- Recalculate on opening affects Composite fields (see 6.2) whose associated
- formulae make use of the system variable TIME$. With the switch OFF the
- contents of such fields are recalculated only when a record is displayed.
- This might not be good enough where, for example, TIME$ is used in a User
- function (see 6.3) to keep track of people’s current ages. Selecting the
- switch causes Powerbase to scan the whole file and update such fields when
- the database is first opened.
-
-
-
- Blank record on deletion If this switch is OFF then deleting a record from
- the database merely removes all references to its key(s) from the index(es),
- leaving the actual record data untouched in the Database file. Although such
- “deleted” records will be overwritten when new records are entered, the
- situation may be deemed unsatisfactory from a security point of view since
- the “deleted” records can be examined by simply loading Database into Edit.
- If the switch is ON deletion causes the relevant record to be over-written
- with a blank record.
-
- Keep descriptor with data alters the behaviour of fields as they are dragged
- around the screen when designing the record layout. With the switch OFF you
- may drag the data field and the descriptor independently of one another.
- With the switch ON this is true only of the descriptor; if you drag the data
- field the descriptor jumps to its “normal” position to the left of the data
- field as soon as you release the mouse button.
-
- Validate input turns data validation (see Ch 5) ON and OFF. If you ever
- find yourself unable to escape from a field linked to a validation table you
- can bring up the Preferences window, deselect this switch and try again.
-
- Display linked table data Every time the caret enters a field with a link
- to a validation table a window showing data from the relevant validation
- table row appears to the right of the field if the switch is ON. This is
- either useful or infuriating, depending on your point of view. If turned OFF
- you can still call up the window for a specific field by double-clicking on
- the field with SELECT (see 5.5).
-
- Warn of external deletion Since deleting data from an External field (see
- 2.6) involves the deletion of an actual file you will probably appreciate
- being warned when you are about to do it. With this switch ON you will be
- given a warning and the opportunity to change your mind.
-
- Warn of duplicates The creation of records with identical primary keys can
- be prohibited if so desired (see 11.2.1). Normally, however, they are
- permitted. You may, if you wish, turn this switch ON to issue a warning that
- such a record is about to be created.
-
- Default action on Return According to the Acorn Style Guide for RISC OS
- typing Return anywhere inside a dialogue box ought to have the same effect
- as clicking on the default action button (that’s the one with the yellow
- channel border) regardless of which writable icon the caret is in. If that’s
- what you want then turn this switch ON. Many users (including the author!)
- hate it and prefer the default action to take place only if the caret is in
- the last writable icon when Return is typed. Hence the default setting,
- which is OFF.
-
- Strip trailing spaces should normally be left ON to avoid unwanted spaces at
- the right of data fields. It is easy to press the space-bar by accident when
- entering data quickly and you might not notice that a field has one or more
- spaces between the end of the last word and the caret.
-
- Balance every <n> records The need to balance indices and the use of this
- option is explained in 10.6.
-
- Remember place in subfile With this switch OFF a change of subfile leads to
- the display of the first record in the new subfile. If you are doing a lot
- of hopping back and forth between subfiles to inspect specific records you
- might want to select the switch. It is then just as if you had bookmarks in
- separate chapters of a book; when you return to a subfile you have
- previously visited you will see the same record you were viewing when you
- left that subfile.
-
- 14.5.4 Save indices (Default: Manual)
-
- Indices are always saved whenever you close a database or quit Powerbase and
- only fear of power cuts or system failure (which includes some kind person
- switching off your computer!) need make you concerned about saving them
- yourself. With the Manual setting nothing happens during normal working
- unless you click Force update on the keypad. Selecting Automatic or Warn
- only allows you to type in a suitable time interval (default = 10 min) at
- which Powerbase will either issue a warning to save your indices (using
- Force update) or actually save them for you.
-
- 14.5.5 Application for ImpulseII data-merging
-
- As noted elsewhere (9.2) Powerbase can merge directly into a
- suitably-formatted Impression document by simply dropping the document icon
- onto the record window. The dialogue box which then appears contains a
- writable icon which shows the application with which Powerbase will merge.
- This name is, by default, “Impression”, but may be altered by users for
- their own purposes. An application which will receive data from Powerbase in
- this way must make use of the ImpulseII protocols as defined by Computer
- Concepts. Even if you are using Style or Publisher the name to which these
- applications respond is still “Impression”.
-
- 14.5.6 Save choices
-
- This section of the window works exactly as it does for CSV options (see
- 14.4) as do the Load default and Cancel buttons.
-
- 14.6 Colours of key fields and linked fields
-
- These may be selected in a window reached by choosing Colours from the
- Miscellaneous submenu. The following default colours are used:−
-
- Type Foreground Background
-
- Descriptor of key field (inactive) dark blue
- -
-
- Descriptor of key field (active) red
- -
-
- Data icon of primary key field (s) -
- pale yellow
-
- Data icon of field linked to validation table dark green
- -
-
- Clicking with SELECT on the descriptor and data icons within this window
- makes either the foreground or background (depending on the setting of the
- two radio buttons) cycle through the available colours. Clicking with ADJUST
- cycles through the colours in the opposite direction.
-
- Apply allows you to see the effect of the changes and Defaults enables you
- to return the colours to what they were before, provided you haven’t clicked
- on Save choices. The latter applies the new colours and saves the changes so
- that they are effective next time the database is used. Different databases
- may have different colours.
-
- 14.7 The Config file
-
- Inside the Powerbase application directory is a sub-directory called
- Resources. The file Config, which will be found there, determines certain
- aspects of the program’s operation which will seldom need changing. Changes
- made to Config take effect only when Powerbase is next loaded. If you load
- the file into Edit you will see lines which determine:−
-
- • maximum number of fields per record (default = 100, maximum = 127)
-
- • maximum number of subsidiary indices (default = 10)
-
- • maximum number of validation tables (default = 10)
-
- • maximum number of pop-up menu fields (default = 3)
-
- • maximum number of columns in a validation table (default = 20)
-
- • whether or not submenus off the icon-bar menu open on the left
- instead of on the right as normal. This feature of RISC OS 3 avoids the
- overlapping submenus which can occur but is so seldom seen that most users
- can’t cope with it at all! Put YES, instead of NO, at the start of the line
- if you want the icon-bar menu to work like that.
-
- • background colour of record window. Default (1) is pale grey.
-
- • whether or not keyboard is placed in caps lock mode when user is
- being asked to input a password. This is to avoid annoying users who set up
- password-protected databases with earlier versions of Powerbase which
- allowed only uppercase letters in passwords. Such users will wish to place
- YES at the start of this line. Current versions of Powerbase allow both
- upper and lowercase letters and users will not want caps lock to be forced
- on.
-
- When altering Config be sure to leave a space between the number (or YES/NO)
- and the explanation.
-
- 14.8 The Messages file
-
- This too is a text file in the Resources sub-directory. It contains all the
- error and warning messages used by Powerbase and all the messages for use
- with the Acorn interactive Help application. The wording of these may be
- altered if you wish. Many error messages contain the string “%0” and
- possibly “%1” and “%2”. Items of data are substituted for these when the
- message is printed so it is important not to omit them or alter their
- logical placement within the message.